<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

<script>
    localStorage.setItem("name", "ljw")
    localStorage.getItem("name")

    // localStorage.removeItem("name")

    // 获取第0个key
    localStorage.key(0)

    // 本地存储只能存储字符串类型，不管存进去是什么类型，取出来都是字符串的
    localStorage.setItem("age", 12)
    
    let age = localStorage.getItem("age")
    console.log(typeof age) // string
</script>
    
</body>
</html>